package surf.browser;

import surf.browser.component.PreferenceWindow;
import surf.browser.component.ProxyWindow;

/**
 * Stores user settings.
 * @author Tom Cashman
 *
 */
public class Settings {
	private static String m_homepage;
	private static PreferenceWindow m_pref;
	private static ProxyWindow m_proxy;
	
	public Settings() {
		m_homepage = "http://www.google.ie";
	}
	
	/**
	 * Sets the user's preferred homepage
	 * @param url
	 */
	public static void setHomepage(String url) {
		m_homepage = url;
	}
	
	/**
	 * Returns the user's homepage
	 * @return
	 */
	public static String getHomepage() {
		return m_homepage;
	}

	/**
	 * Opens the preferences dialog
	 */
	public static void openPreferences() {
		m_pref = new PreferenceWindow();
	}

	/**
	 * Opens the proxy dialog.
	 */
	public static void openProxy() {
		m_proxy = new ProxyWindow();
	}
	
	/**
	 * Returns the preferences dialog.
	 * @return
	 */
	public static PreferenceWindow getPrefWindow() {
		return m_pref;
	}
	
	/**
	 * Returns the proxy dialog.
	 * @return
	 */
	public static ProxyWindow getProxyWindow() {
		return m_proxy;
	}
}
